package com.sright.bcard.mini.web.task;

import com.sright.bcard.user.share.service.VisitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import java.util.Date;

@Configuration
@EnableScheduling
public class VisitorDataPushTask {
    @Autowired
    VisitorService visitorService;

//    @Scheduled(cron = "* * * * * ?")
    private void configureTasks() throws Exception {
        visitorService.dataPushDay();
        System.out.println("定时任务：" + new Date().toString());
    }
}
